﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'proc_cm_ListDailywordAnwer')
BEGIN
    PRINT 'Dropping Procedure proc_cm_ListDailywordAnwer'
    DROP  Procedure  proc_cm_ListDailywordAnwer
END
GO

PRINT 'Creating Procedure proc_cm_ListDailywordAnwer'
GO

CREATE PROCEDURE [dbo].[proc_cm_ListDailywordAnwer]
	@pDailywordStatusId uniqueidentifier
AS
BEGIN
	SET NOCOUNT ON

	SELECT 
		da.[dailyword_answer_id]
		,da.[dailyword_question_id]
		,da.[dailyword_status_id]
		,da.[answer_txt]
		,da.[correct_ind]
		,da.[created_dttm]
		,da.[updated_dttm]
	FROM 
		[dbo].[tbl_dailyword_answer] da (nolock)
	WHERE
		da.[dailyword_status_id] = @pDailywordStatusId
END
GO

GRANT EXEC ON dbo.proc_cm_ListDailywordAnwer TO PUBLIC
GO
